<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <ul>
        <li
          v-for="(user, index2) in users"
          :key="index2"
          v-if="user.gender == '女'"
        >
          {{index2}} - {{user.name}} - {{user.gender}} - {{user.age}}
        </li>
      </ul>

      <ul>
        <li v-for="(value, key, index) in user" :key="index">
          {{index}}-{{key}}:{{value}}
        </li>
      </ul>
    </div>

    <script src="../node_modules/vue/dist/vue.js"></script>

    <script>
      let app = new Vue({
        el: "#app",
        data: {
          users: [
            { name: "柳岩", gender: "女", age: 21 },
            { name: "张三", gender: "男", age: 18 },
            { name: "范冰冰", gender: "女", age: 24 },
            { name: "刘亦菲", gender: "女", age: 18 },
            { name: "古力娜扎", gender: "女", age: 25 },
          ],
          user: { name: "张三", gender: "男", age: 18 },
        },
      });
    </script>
  </body>
</html>
